﻿using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Composition;

namespace Songhay.Office2010.Word
{
    /// <summary>
    /// Collects the commands used
    /// for an Office Word Solution.
    /// </summary>
    public class OfficeWordCommands : IEnumerable<IOfficeWordCommand>
    {
        #region IEnumerable<IOfficeWordCommand> Members

        /// <summary>
        /// Gets the enumerator.
        /// </summary>
        public IEnumerator<IOfficeWordCommand> GetEnumerator()
        {
            if(this._commands == null) return null;
            return this._commands.GetEnumerator();
        }

        #endregion

        #region IEnumerable Members

        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }

        #endregion

        [ImportMany(typeof(IOfficeWordCommand))]
        IEnumerable<IOfficeWordCommand> _commands;
    }
}
